import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
   {
    title: '设备标识码',
    align:"center",
    dataIndex: 'deviceSn'
   },
   {
    title: '设备名称',
    align:"center",
    dataIndex: 'deviceName'
   },
   {
    title: '刷卡方式',
    align:"center",
    dataIndex: 'accessMethod_dictText'
   },
   {
    title: '图像抓拍',
    align:"center",
    dataIndex: 'snapLink',
    slots: { customRender: 'img' },
   },
   {
    title: '刷卡卡号',
    align:"center",
    dataIndex: 'cardNo'
   },
   {
    title: '通行时间',
    align:"center",
    dataIndex: 'accessDate'
   },
   {
    title: '上送时间',
    align:"center",
    dataIndex: 'seedDate'
   }
];

//查询数据
export const searchFormSchema: FormSchema[] = [
	{
      label: "设备名称",
      field: 'deviceName',
      component: 'Input',
      //colProps: {span: 6},
 	},
	{
      label: "刷卡方式",
      field: 'accessMethod',
      component: 'JDictSelectTag',
      componentProps:{
          dictCode:"accessMethod"
      },
      //colProps: {span: 6},
 	},
     {
      label: "通行时间",
      field: "accessDate",
      component: 'RangePicker',
      componentProps: {
          valueType: 'Date',
          showTime:true
      },
      //colProps: {span: 6},
	}
];

/**
* 流程表单调用这个方法获取formSchema
* @param param
*/
export function getBpmFormSchema(_formData): FormSchema[]{
  // 默认和原始表单保持一致 如果流程中配置了权限数据，这里需要单独处理formSchema
  return formSchema;
}